package com.whfc.emp.service.impl;

import java.util.Collections;
import java.util.List;

import com.whfc.emp.dao.FileUploadInfoMapper;
import com.whfc.emp.service.FileUploadInfoService;
import com.whfc.emp.entity.FileUploadInfo;
import com.whfc.entity.dto.Apply.rep.FileUploadInfoRep;
import org.apache.dubbo.config.annotation.DubboService;

import javax.annotation.Resource;

@DubboService(interfaceClass = FileUploadInfoService.class, version = "1.0.0",timeout = 30000)
public class FileUploadInfoServiceImpl implements FileUploadInfoService {

    @Resource
    private FileUploadInfoMapper fileUploadInfoMapper;

    @Override
    public List<FileUploadInfoRep> getAllFileList() {
        return fileUploadInfoMapper.selectAllFileList();
    }

    @Override
    public int uploadFile(FileUploadInfo fileUploadInfo) {
        return fileUploadInfoMapper.insertFile(fileUploadInfo);
    }

    @Override
    public String getFileUrlById(Integer id) {
        return fileUploadInfoMapper.selectFileUrlById(id);
    }

    @Override
    public List<FileUploadInfoRep> selectFileUrlByMeetingId(Integer id) {
        return fileUploadInfoMapper.selectFileUrlByMeetingId(id);
    }
}